# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-munch
pkgver=4.0.0
pkgrel=1
pkgdesc="A dot-accessible dictionary (a la JavaScript objects)"
url="https://github.com/Infinidat/munch"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools' 'python-pbr' 'git')
checkdepends=('python-pytest' 'python-yaml')
source=(https://pypi.io/packages/source/m/munch/munch-${pkgver}.tar.gz)
sha512sums=('7beeee4d3fd084ac929e796cd62af097c2602a3ec06405f79b562bc6d14577350adbbe02848253c62f0938e706b9056799bfd5b9c2bdff6e559b3903b8cdca5c')

build() {
  cd munch-$pkgver
  python setup.py build
}

check() {
  cd munch-$pkgver
  pytest
}

package() {
  cd munch-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
